home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
PROGNG_C
/
MDSPL100.LZH
/
MDSP1.C
< prev
next >
Wrap
Text File
|
1987-11-01
|
1KB
|
37 lines
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <dos.h>
#include <conio.h>
#include <ctype.h>
#include "mdisplay.h"
/* */
/* This program writes to a window that consists of the left half */
/* of the monochrome monitor. It is used to demonstrate the use */
/* of the mwin I/O routines from multiple programs. Before this */
/* program has run, initialized the monochrome card with the MDSPI */
/* utility program. */
char input;
int attrb;
int wind1;
main(argc, argv)
int argc;
char *argv[];
{
initMwin(); /* Initialize mwin data areas */
wind1 = createMwin(0,0,39,24); /* Create window, left half */
if (wind1 == ERROR) /* Successful? Should be */
{ printf("Error in createMwin. Program aborted.\n");
exit(0); }
attrb = 3; /* Normal display attribute */
input = getch(); /* Write input until eof or ESC*/
for ( ;!eof(fileno(stdin)) & input!=27; ) /* quit on eof or ESC*/
{ writeCharToMwin(wind1, input, attrb);
input = getch();
}
}